import { createStore, combineReducers, applyMiddleware } from 'redux';
import thunk from 'redux-thunk';
import { reducer as firstReducer } from '../views/First/_index.js';
import { reducer as twoReducer } from '../views/TwoRedux/_index.js';
// import {reducer as ajaxReducer} from '../views/5-19/index'
import { reducer as downupReducer } from '../views/Downup/_index.js'
import { reducer as zero } from '../views/zero/store'
import { reducer as url } from '../views/url/_index.js'
import { reducer as obj } from '../views/525/_index.js'
import { reducer as lian } from '../views/reduxlx/_index'
const reducer = combineReducers({
    first: firstReducer,
    two: twoReducer,
    // three:ajaxReducer,
    downup: downupReducer,
    zero: zero,
    url: url,
    obj: obj,
    lian: lian
    // remove:removeReducer,
    // edit:editReducer,
})
function newJson(str) {
    if (str) {
        var json = (new Function('return' + str))();
        return json
    } else {
        console.log('')
    }

}
export default createStore(reducer, newJson(localStorage.getItem('zylRoot')), applyMiddleware(thunk));

